<div class="dataInnBottom">
    <div class="dataHeader">
        <h4>Houses</h4>
    </div>
    <div class="clr"></div>
    <?php $this->addScriptPath('../application/views/scripts/'); ?>
    <?= $this->paginationControl($this->paginator, 'Sliding', 'paginator.phtml') ?>
    <div class="clr"></div>
    <table class="dataActions" width="100%" border="0" cellpadding="0" cellspacing="0" >
        <tr>
            <th>Cabinet</th>
            <th>Switch</th>
            <th>House</th>
            <th>Address</th>
            <th>Phone</th>
            <th>Interaction</th>
            <th>Contract</th>
            <th>Status</th>
            <th>Files</th>
        </tr>
        <?php foreach ($this->paginator as $item) {
          $doc = $this->getContractDoc($item['id']);
        ?>
            <tr>
                <td><?php echo $item['cabinet_name'] ?></td>
                <td><?php echo $item['switch_name'] ?></td>
                <td><?php echo $item['official_address']; ?></td>
                <td><?php echo $item['address']; ?></td>
                <td><?php echo '####'; ?></td>
                <td><a href="javascript:void(0)" onclick="interaction('<?php echo $item['id'];?>')">Interaction</a></td>
                <td>
                    <a href="javascript:void(0)" onclick="contract('<?php echo $item['id'];?>')"><?php echo (!empty($doc)?'See':'Add')?> Cont. Doc</a>
                </td>
                <td><?php echo $item['status']; ?></td>
                <td>
                    <a href="javascript:void(0)" onclick="addFile('<?php echo $item['cabinet_id'] ?>','<?php echo $item['switch_id'] ?>')">Files</a>
                </td>
            </tr>
        <?php } ?>
    </table>
</div>